package com.foreknow.demo3;

/**
 * 数组的初始化
 */
public class ArrayDemo5 {
    public static void main(String[] args) {
        int[] array = new int[]{1, 2, 3, 4, 5};
        String[] array1 = {"aaa", "bbb", "ccc"};
        System.out.println("---------------------------");
        for (int i = 0; i < array1.length; i++) {
            System.out.println(array1[i]);
        }
        System.out.println("-----------------------");
        for (String str : array1
        ) {
            System.out.println(str);
        }
    }
}

